home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Libraries / BlobMgr / Library Folder / Member.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-25  |  1.6 KB  |  100 lines  |  [TEXT/KAHL]

  1. /*
  2.  * Member.c - functions to access members of the Blob structure
  3.  *
  4.  * These were macros up through release 1.06, but release 1.07 was made
  5.  * Pascal-compatible, and C macros don't work very well for Pascal.
  6.  */
  7.  
  8. # include    "BlobMgr.h"
  9.  
  10. /*
  11. # define    FirstBlob(bSet)        ((**(bSet)).firstBlob)
  12. # define    LastBlob(bSet)        ((**(bSet)).lastBlob)
  13. # define    NextBlob(b)            ((**(b)).nextBlob)
  14. # define    SetBRefCon(b,val)    ((**(b)).bRefCon = (long) (val))
  15. # define    GetBRefCon(b)        ((long) (**(b)).bRefCon)
  16. # define    BStatRgn(b)            ((**(b)).statRgn)
  17. # define    BDragRgn(b)            ((**(b)).dragRgn)
  18. # define    BStatBox(b)            ((**BStatRgn(b)).rgnBBox)
  19. # define    BDragBox(b)            ((**BDragRgn(b)).rgnBBox)
  20. # define    BGlob(b)            ((**(b)).glob)
  21. # define    FirstBMatch(b)        ((**((**(b)).matches)).mBlob)
  22. */
  23.  
  24.  
  25. pascal BlobHandle
  26. FirstBlob (BlobSetHandle bSet)
  27. {
  28.     return ((**bSet).firstBlob);
  29. }
  30.  
  31.  
  32. pascal BlobHandle
  33. LastBlob (BlobSetHandle bSet)
  34. {
  35.     return ((**bSet).lastBlob);
  36. }
  37.  
  38.  
  39. pascal BlobHandle
  40. NextBlob (BlobHandle b)
  41. {
  42.     return ((**b).nextBlob);
  43. }
  44.  
  45.  
  46. pascal void
  47. SetBRefCon (BlobHandle b, long val)
  48. {
  49.     (**b).bRefCon = val;
  50. }
  51.  
  52.  
  53. pascal long
  54. GetBRefCon (BlobHandle b)
  55. {
  56.     return ((**b).bRefCon);
  57. }
  58.  
  59.  
  60. pascal RgnHandle
  61. BStatRgn (BlobHandle b)
  62. {
  63.     return ((**b).statRgn);
  64. }
  65.  
  66.  
  67. pascal RgnHandle
  68. BDragRgn (BlobHandle b)
  69. {
  70.     return ((**b).dragRgn);
  71. }
  72.  
  73.  
  74. pascal Rect
  75. BStatBox (BlobHandle b)
  76. {
  77.     return ((**BStatRgn (b)).rgnBBox);
  78. }
  79.  
  80.  
  81. pascal Rect
  82. BDragBox (BlobHandle b)
  83. {
  84.     return ((**BDragRgn (b)).rgnBBox);
  85. }
  86.  
  87.  
  88. pascal BlobHandle
  89. BGlob (BlobHandle b)
  90. {
  91.     return ((**b).glob);
  92. }
  93.  
  94.  
  95. pascal BlobHandle
  96. FirstBMatch (BlobHandle b)
  97. {
  98.     return ((**((**b).matches)).mBlob);
  99. }
  100.